package cn.stylefeng.guns.modular.hx.storage.mapper;

import cn.stylefeng.guns.modular.hx.storage.entity.HxStorageOutDetailed;
import cn.stylefeng.guns.modular.hx.storage.model.params.HxStorageOutDetailedParam;
import cn.stylefeng.guns.modular.hx.storage.model.result.HxStorageOutDetailedResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 拣货单明细表 Mapper 接口
 * </p>
 *
 * @author zhucx
 * @since 2023-09-05
 */
public interface HxStorageOutDetailedMapper extends BaseMapper<HxStorageOutDetailed> {

    /**
     * 获取列表
     *
     * @author zhucx
     * @Date 2023-09-05
     */
    List<HxStorageOutDetailedResult> customList(@Param("paramCondition") HxStorageOutDetailedParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zhucx
     * @Date 2023-09-05
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") HxStorageOutDetailedParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhucx
     * @Date 2023-09-05
     */
    Page<HxStorageOutDetailedResult> customPageList(@Param("page") Page page, @Param("paramCondition") HxStorageOutDetailedParam paramCondition, @Param("condition") String condition);

    Page<HxStorageOutDetailedResult> findjiluPageBySpec(@Param("page") Page page, @Param("paramCondition") HxStorageOutDetailedParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author zhucx
     * @Date 2023-09-05
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") HxStorageOutDetailedParam paramCondition);

	HxStorageOutDetailedResult findZySumBySpec(@Param("paramCondition")HxStorageOutDetailedParam hxStorageOutDetailedParam);

    HxStorageOutDetailedResult findJhZSumBySpec(@Param("paramCondition")HxStorageOutDetailedParam hxStorageOutDetailedParam);

    List<HxStorageOutDetailedResult> findZySumList(@Param("paramCondition")HxStorageOutDetailedParam hxStorageOutDetailedParam);

	boolean saveBatchList(@Param("list")List<HxStorageOutDetailedParam> list);

	int addByStorageNumber(@Param("storageNumber") String storageNumber,@Param("newStorageNumber") String newStorageNumber);

    List<HxStorageOutDetailedResult> selectGoodSNumByStorageNumber(@Param("storageNumber") String storageNumber);

	List<HxStorageOutDetailedResult> findApplistBySpec(@Param("paramCondition")HxStorageOutDetailedParam param);

	HxStorageOutDetailedResult findBySpec(@Param("paramCondition")HxStorageOutDetailedParam param);

    List<HxStorageOutDetailedResult> findListBySpec2(@Param("paramCondition")HxStorageOutDetailedParam param);
    List<HxStorageOutDetailedResult> findBySpec3(@Param("paramCondition")HxStorageOutDetailedParam param);


    List<HxStorageOutDetailedResult> findAppzhijianDetailedlistBySpec(@Param("paramCondition") HxStorageOutDetailedParam hxStorageOutDetailedParam);

    List<HxStorageOutDetailedResult> findAppzhijianCountDetailedlistBySpec(@Param("paramCondition") HxStorageOutDetailedParam hxStorageOutDetailedParam);

	List<HxStorageOutDetailedResult> findListBySpec(@Param("paramCondition")HxStorageOutDetailedParam param);

    void update1(@Param("paramCondition")HxStorageOutDetailedParam param);

	void updatequalityNumBySpec(@Param("paramCondition")HxStorageOutDetailedParam hxStorageOutDetailedParam);

	void updaterealNumBySpec(@Param("paramCondition")HxStorageOutDetailedParam hxStorageOutDetailedParam);

	boolean updateBatchList(@Param("_list2")List<HxStorageOutDetailedParam> _list2);

	boolean updateBatchList2(@Param("_list2")List<HxStorageOutDetailedParam> _list2);

	List<HxStorageOutDetailedResult> findNumNotRealNumListBySpec(@Param("paramCondition")HxStorageOutDetailedParam detailedParam);

	HxStorageOutDetailedResult findnewestoutDetailed(@Param("paramCondition")HxStorageOutDetailedParam hxStorageOutDetailedParam);

	HxStorageOutDetailedResult count(@Param("paramCondition")HxStorageOutDetailedParam hxStorageOutDetailedParam,@Param("condition") String condition);

	List<HxStorageOutDetailedResult> listAll(@Param("paramCondition")HxStorageOutDetailedParam hxStorageOutDetailedParam, @Param("condition")String condition);

    int updateCode(@Param("paramCondition")HxStorageOutDetailedParam param);

    int updateOrder(@Param("paramCondition")HxStorageOutDetailedParam param);

}
